<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/16
 * Time: 13:16
 * description: 用于计算帖子查看次数
 */
header("Access-Control-Allow-Origin:*");
require_once('dbServerConnect.php');
$con = new DB();
$link = $con->mySqlServer();
if(!$link) {echo '数据库链接失败'; return;}
$blog_id = $_GET["blog_id"];
if(empty($blog_id))  return;

$sql = "update blog_container set views=(views+1) where id='$blog_id'";
mysqli_query($link,$sql) or die(mysqli_error($link));



